<?php 
define('RUN_KATANA', true);
require('../../includes/config.php');
$orderid = intval($_REQUEST['order']);
$action  = $_REQUEST['action'];
if($orderid > 0)
{
	if(file_exists(ORDERS_PATH.'dibs_order_'.$orderid.'.html'))
	{
		?>
       	<!DOCTYPE html>
        <html>
            <head>
                <title>Payment form</title>
                <meta charset="utf-8">
                <meta http-equiv="Content-Script-Type" content="text/javascript" />
                <meta http-equiv="Content-Style-Type" content="text/css" />
                <script type="text/javascript">
                window.onload = function (evt) { document.forms[0].submit(); }
                </script> 
            </head>
            <body>
                <form action="https://sat1.dibspayment.com/dibspaymentwindow/entrypoint" method="post">
                    <?php require_once(ORDERS_PATH.'dibs_order_'.$orderid.'.html'); ?>
                    <button value="submit" type="submit">Videresender - Klikk her dersom du ikke blir videresendt til betaling</button>
                </form>
            </body>
        </html>
		<?php 
	}
}
?>